-
Notifications
You must be signed in to change notification settings - Fork 18
build: added support for uv #241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
cako
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks really good! The website looks great. Left a few comments. For some improvements I'd consider:
- Use nox for local testing different Python versions
- Retire Makefile (doesn't work natively on Windows, but nox does)
- Default to uv, then conda, then pip.
Also, for the segmentation.py example to work, I need to crank up the maxiter to 30. Otherwise I get:
r = _zeros._bisect(f, a, b, xtol, rtol, maxiter, args, full_output, disp)
RuntimeError: Failed to converge after 20 iterations.
docs/source/conf.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line complains when I run docs. Two suggestions: format this file with ruff and use raw string (r"\.py").
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be fixed now efdfd9c
Also I noticed that running ruff on the file did not give any error (but flake8 did)... ChatGPT suggested to add some flake8 behaviors to ruff in pyproject.toml based on the errors I was getting with flake8 and not with ruff - but this now breaks the flake8 CI, will be fixed in a separate PR as described in #244.
Finally note that I run uv run ruff format docs/source/conf.py, so the file is changed a bit in few other places 😄
requirements-dev.txt
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this file still required?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess same for requirements.txt?
For now I kept it because I was allowing one to use pip to create an environment, but I think we can just change the instructions to pip install .[dev]... will do that and get rid of these files 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, change of plan... completely removed the requirements* files and any use/mention of them - 0235ecb, 308a007
We have now only conda and uv as two alternative setups 😄 For pure pip venv-based environments we used to provide commands with the requirements files, I tried using dependency-groups but that apparently does not work, so I think it is time to retire it - if someone wants to use it at the own risk, I am sure they can figure out how to install the required dependencies by hand 😉
This PR adds support for UV to PyProximal:
pyproject.tomluv.lock*MakefileIt also modernizes the overall tooling:
setup.cfgtopyproject.tomlFinally, it contains various improvements to the documentation:
sphinx-designto have tabs in installation instructions for conda/pip/uv